import React, { Component } from 'react'

export default class UserChild extends Component {
  constructor() {
    super()
    this.state = {
      msg: '成都的美食-蛋烘糕'
    }
  }
  fnA() {
    // ...
    this.props.car(this.state.msg)
  }
  render() {
    console.log(this.props);
    return (
      <div>
        <p>我是userinfo的子组件</p>
        <button onClick={()=>this.fnA()}>子传父</button>
      </div>
    )
  }
}
